<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    function Person(str) {

    }
    Person.prototype.runTasks = async function () {

    }
    Person.prototype.init = function (str) {

    }
    Person.prototype.eat = function (str) {

    }
    Person.prototype.sleep = function (str) {

    }
    Person.prototype.sleepFirst = function (str) {

    }
    // console.dir(Person)
    Person('devin')
      .eat('苹果')
      .sleep(3000)
      .sleepFirst(3000)
      .eat('香蕉');
    // 整个执行过程
    // 首先等待3S，然后打印this is renyuliang 在吃苹果 然后再等待3S 最后吃香蕉
  </script>
</body>

</html>
